﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.OracleClient;
using BookingSystemDAL;
using BookingSystemModel;


namespace BookingSystemBLL
{
    public class FlightBLL
    {
        private static FlightDAL AlFlDAL = new FlightDAL();
        private static Flight flightDAL = new Flight();
        public FlightBLL()
        {
            
        }    
    
        //查询所有航班
        public static DataSet GetAllFlight()
        {
            return AlFlDAL.GetAllFlight();
        }
        //根据航班号查询
        public static DataSet GetFlightByFlightNumber(string FlightNumber)
        {
            return AlFlDAL.GetFlightByFlightNumber(FlightNumber);
        }

        public static int DeleteFlight(string Id)
        {
            return AlFlDAL.DeleteFlight(Id);
        }
        //添加航班
        public static int AddFlight(Flight flight)
        {
            return AlFlDAL.AddFlight(flight);
        }
        //根据出发地，目的地，起始时间查询航班
        public static DataSet GetDCFlight(string FromAddress, string ToAddress, string  FromDate)
        {
            return AlFlDAL.GetDCFlight(FromAddress, ToAddress, FromDate);
        }
    }

    
}
